Global commands: restore commands affected by division operator differences between Python 2 and 3 - #9748
Merged
michaelDCurran merged 2 commits intoJun 15, 2019
Conversation
…ee integers for mouse coordinates. Re nvaccess#9641. Move mouse to navigator object command fails in Python 3 because of ytpe differences: user32::SetCursorPos wants integers, but because one slash is used, it'll get floats, causing errors to be logged. Thus guarantee inteers via floor division, thus restoring the said command.
…nvaccess#9641. With just one slash, hours nad minutes for remaining time on battery will get floats when the text format specifies integers. Thus use floor division, restoring battery status command in Python 3.
michaelDCurran
approved these changes
Jun 15, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Another variant of #9641
Summary of the issue:
Global commands involving divisoin operators are broken in Python 3: move mouse to navigator object and battery status.
Description of how this pull request fixes the issue:
Changed one slash to two slashes for affected commands.
Testing performed:
Compiled a Python 3 version of NVDA and ran affected commands before and after division operator change.
Known issues with pull request:
None
Change log entry:
None
Additional context:
There are division operator issues in other files that cannot be patched until UI Access privilege is restored, the most prominent one being touch tracking (may or may not be an integer when calculating touch gesture tracking).